<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Stream cipher attacks</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Stream_cipher_attacks"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Stream_cipher_attacks rootpage-Stream_cipher_attacks skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Stream cipher attacks</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1305420660">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}html body.mediawiki .mw-parser-output .metadata.ambox{border-left:10px solid #36c!important;background-color:var(--background-color-neutral-subtle,#fbfbfb)!important}html body.mediawiki .mw-parser-output .metadata.ambox-speedy{border-left:10px solid #b32424!important;background-color:var(--background-color-destructive-subtle,#fee7e6)!important}html body.mediawiki .mw-parser-output .metadata.ambox-delete{border-left:10px solid #b32424!important}html body.mediawiki .mw-parser-output .metadata.ambox-content{border-left:10px solid #f28500!important}html body.mediawiki .mw-parser-output .metadata.ambox-style{border-left:10px solid #fc3!important}html body.mediawiki .mw-parser-output .metadata.ambox-move{border-left:10px solid #9932cc!important}html body.mediawiki .mw-parser-output .metadata.ambox-protection{border-left:10px solid #a2a9b1!important}.mw-parser-output .ambox.mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1248332772">
/* start https://en.wikipedia.org/ */
.mw-parser-output .multiple-issues-text{width:95%;margin:0.2em 0}.mw-parser-output .multiple-issues-text>.mw-collapsible-content{margin-top:0.3em}.mw-parser-output .compact-ambox .ambox{border:none;border-collapse:collapse;background-color:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .mw-parser-output .compact-ambox .ambox.mbox-small-left{font-size:100%;width:auto;margin:0}.mw-parser-output .compact-ambox .ambox .mbox-text{padding:0!important;margin:0!important}.mw-parser-output .compact-ambox .ambox .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:disc}body.skin-minerva .mw-parser-output .multiple-issues-text>.mw-collapsible-toggle,.mw-parser-output .compact-ambox .ambox .mbox-image,.mw-parser-output .compact-ambox .ambox .mbox-imageright,.mw-parser-output .compact-ambox .ambox .mbox-empty-cell,.mw-parser-output .compact-ambox .hide-when-compact{display:none}
/* end https://en.wikipedia.org/ */
</style>
<p><a href="Stream_cipher" title="Stream cipher">Stream ciphers</a>, where <a href="Plaintext" title="Plaintext">plaintext</a> bits are combined with a cipher bit stream by an exclusive-or operation (<a href="Xor" class="mw-redirect" title="Xor">xor</a>), can be very secure if used properly. However, they are vulnerable to attacks if certain precautions are not followed:
</p>
<ul><li>keys must never be reused</li>
<li>valid decryption should never be relied on to indicate authenticity</li></ul>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Reused_key_attack">Reused key attack</h2></div>
<p><a href="Stream_cipher" title="Stream cipher">Stream ciphers</a> are vulnerable to attack if the same key is used twice (depth of two) or more.
</p><p>Say we send messages <i>A</i> and <i>B</i> of the same length, both encrypted using same key, <i>K</i>. The stream cipher produces a string of bits <i>C(K)</i> the same length as the messages. The encrypted versions of the messages then are:
</p>
<dl><dd><i>E(A) = A xor C</i></dd>
<dd><i>E(B) = B xor C</i></dd></dl>
<p>where <i>xor</i> is performed bit by bit.
</p><p>Say an adversary has intercepted <i>E(A)</i> and <i>E(B)</i>. They can easily compute:
</p>
<dl><dd><i>E(A) xor E(B)</i></dd></dl>
<p>However, <i>xor</i> is <a href="Commutative" class="mw-redirect" title="Commutative">commutative</a> and has the property that <i>X xor X = 0</i> (self-inverse) so:
</p>
<dl><dd><i>E(A) xor E(B) = (A xor C) xor (B xor C) = A xor B xor C xor C = A xor B</i></dd></dl>
<p>If one message is longer than the other, our adversary just truncates the longer message to the size of the shorter and their attack will only reveal that portion of the longer message. In other words, if anyone intercepts two messages encrypted with the same key, they can recover <i>A xor B</i>, which is a form of <a href="Running_key_cipher" title="Running key cipher">running key cipher</a>. Even if neither message is known, as long as both messages are in a natural language, such a cipher can often be broken by paper-and-pencil methods. During <a href="World_War_II" title="World War II">World War II</a>, British cryptanalyst <a href="John_Tiltman" title="John Tiltman">John Tiltman</a> accomplished this with the <a href="Lorenz_cipher" title="Lorenz cipher">Lorenz cipher</a> (dubbed "Tunny"). With an average <a href="Personal_computer" title="Personal computer">personal computer</a>, such ciphers can usually be broken in a matter of minutes. If one message is known, the solution is trivial.
</p><p>Another situation where recovery is trivial is if <a href="Traffic-flow_security" class="mw-redirect" title="Traffic-flow security">traffic-flow security</a> measures have each station sending a continuous stream of cipher bits, with null characters (e.g. <i>LTRS</i> in <a href="Baudot_code" title="Baudot code">Baudot</a>) being sent when there is no real traffic. This is common in military communications. In that case, and if the transmission channel is not fully loaded, there is a good likelihood that one of the ciphertext streams will be just nulls. The <a href="NSA" class="mw-redirect" title="NSA">NSA</a> goes to great lengths to prevent keys from being used twice. 1960s-era encryption systems often included a <a href="Punched_card" title="Punched card">punched card</a> reader for loading keys. The mechanism would automatically cut the card in half when the card was removed, preventing its reuse.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup class="reference nowrap"><span title="Page / location: p. 6">: p. 6 </span></sup>
</p><p>One way to avoid this problem is to use an <a href="Initialization_vector" title="Initialization vector">initialization vector</a> (IV), sent in the clear, that is combined with a secret master key to create a one-time key for the stream cipher. This is done in several common systems that use the popular stream cipher <a href="RC4" title="RC4">RC4</a>, including <a href="Wired_Equivalent_Privacy" title="Wired Equivalent Privacy">Wired Equivalent Privacy</a> (WEP), <a href="Wi-Fi_Protected_Access" title="Wi-Fi Protected Access">Wi-Fi Protected Access</a> (WPA) and <a href="Ciphersaber" class="mw-redirect" title="Ciphersaber">Ciphersaber</a>. One of the many problems with WEP was that its IV was too short, 24 bits. This meant that there was a high likelihood that the same IV would be used twice if more than a few thousand packets were sent with the same master key (see <a href="Birthday_attack" title="Birthday attack">birthday attack</a>), subjecting the packets with duplicated IV to the key reuse attack. This problem was fixed in WPA by changing the "master" key frequently.
</p>
<div class="mw-heading mw-heading2"><h2 id="Bit-flipping_attack">Bit-flipping attack</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Bit-flipping_attack" title="Bit-flipping attack">Bit-flipping attack</a></div>
<div role="note" class="hatnote navigation-not-searchable">See also: <a href="Malleability_(cryptography)" title="Malleability (cryptography)">Malleability (cryptography)</a></div>
<p>Suppose an adversary knows the exact content of all or part of one of our messages. As a part of a <a href="Man_in_the_middle_attack" class="mw-redirect" title="Man in the middle attack">man in the middle attack</a> or <a href="Replay_attack" title="Replay attack">replay attack</a>, they can alter the content of the message without knowing the key, <i>K</i>. Say, for example, they know a portion of the message, say an electronics fund transfer, contains the <a href="ASCII" title="ASCII">ASCII</a> string <i>"$1000.00"</i>. They can change that to <i>"$9500.00"</i> by XORing that portion of the ciphertext with the string: <i>"$1000.00" xor "$9500.00"</i>. To see how this works, consider that the cipher text we send is just <i>C(K) xor "$1000.00"</i>. The new message the adversary is creating is:
</p>
<dl><dd><i>(C(K) xor "$1000.00") xor ("$1000.00" xor "$9500.00") = C(K) xor "$1000.00" xor "$1000.00" xor "$9500.00" = C(K) xor "$9500.00"</i></dd></dl>
<p>Recall that a string <a href="Exclusive_or" title="Exclusive or">XORed</a> with itself produces all zeros and that a string of zeros XORed with another string leaves that string intact. The result, C(K) xor "$9500.00", is what our ciphertext would have been if $9500 were the correct amount.
</p><p>Bit-flipping attacks can be prevented by including <a href="Message_authentication_code" title="Message authentication code">message authentication code</a> to increase the likelihood that tampering will be detected.
</p>
<div class="mw-heading mw-heading2"><h2 id="Chosen-IV_attack">Chosen-IV attack</h2></div>
<p>Stream ciphers combine a secret key with an agreed initialization vector (IV) to produce a pseudo-random sequence which from time-to-time is re-synchronized.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> A "Chosen IV" attack relies on finding particular IV's which taken together probably will reveal information about the secret key. Typically multiple pairs of IV are chosen and differences in generated key-streams are then analysed statistically for a linear <a href="Correlation_attack" title="Correlation attack">correlation</a> and/or an algebraic Boolean relation (see also <a href="Differential_cryptanalysis" title="Differential cryptanalysis">Differential cryptanalysis</a>). If choosing particular values of the initialization vector does expose a non-random pattern in the generated sequence, then this attack computes some bits and thus shortens the effective key length. A symptom of the attack would be frequent re-synchronisation. Modern stream ciphers include steps to adequately mix the secret key with an initialization vector, usually by performing many initial rounds.
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.nsa.gov/about/_files/cryptologic_heritage/publications/misc/tsec_kw26.pdf">Securing Record Communications: The TSEC/KW-26</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121010011445/https://www.nsa.gov/about/_files/cryptologic_heritage/publications/misc/tsec_kw26.pdf">Archived</a> 2012-10-10 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, Melville Klein, NSA history series</span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFEnglundJohanssonSonmez_Turan2007" class="citation book cs1">Englund, Hakan; Johansson, Thomas; Sonmez Turan, Meltem (2007). "A Framework for Chosen IV Statistical Analysis of Stream Ciphers". <a rel="nofollow" class="external text" href="https://web.archive.org/web/20181001182527/https://pdfs.semanticscholar.org/cdaf/30e07673a11eb95f62793858951da2feba32.pdf"><i>Progress in Cryptology – INDOCRYPT 2007</i></a> <span class="cs1-format">(PDF)</span>. Lecture Notes in Computer Science. Vol. 4859 (INDOCRYPT / volume 4859 of LNCS ed.). Springer. pp. <span class="nowrap">268–</span>281. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F978-3-540-77026-8_20">10.1007/978-3-540-77026-8_20</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-77025-1</bdi>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a> <a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:18097959">18097959</a>. Archived from <a rel="nofollow" class="external text" href="https://pdfs.semanticscholar.org/cdaf/30e07673a11eb95f62793858951da2feba32.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2018-10-01<span class="reference-accessdate">. Retrieved <span class="nowrap">1 October</span> 2018</span>.</cite></span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://www.isaac.cs.berkeley.edu/isaac/wep-faq.html">Security of the WEP algorithm</a></li>
<li><a rel="nofollow" class="external text" href="https://eprint.iacr.org/2014/677.pdf">"Attacks in Stream Ciphers: A Survey"</a> – a brief 2014 overview of different stream cipher attacks</li>
<li><a rel="nofollow" class="external text" href="http://www.isical.ac.in/~palash/talks/ASK11-talk.pdf">"Attacks on Stream Ciphers: A Perspective"</a> – talk slides from 2011</li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-label="Navbox0" style="padding:3px"><table class="nowraplinks hlist navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Stream_ciphers94" style="font-size:114%;margin:0 4em"><a href="Stream_cipher" title="Stream cipher">Stream ciphers</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Widely used ciphers</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="A5/1" title="A5/1">A5/1</a></li>
<li><a href="A5/2" title="A5/2">A5/2</a></li>
<li><a href="Salsa20#ChaCha_variant" title="Salsa20">ChaCha</a></li>
<li><a href="Crypto-1" title="Crypto-1">Crypto-1</a></li>
<li><a href="E0_(cipher)" title="E0 (cipher)">E0</a></li>
<li><a href="RC4" title="RC4">RC4</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="ESTREAM" title="ESTREAM">eSTREAM</a> Portfolio</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%">Software</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="HC-256" title="HC-256">HC-128</a></li>
<li><a href="Rabbit_(cipher)" title="Rabbit (cipher)">Rabbit</a></li>
<li><a href="Salsa20" title="Salsa20">Salsa20</a></li>
<li><a href="SOSEMANUK" title="SOSEMANUK">SOSEMANUK</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Hardware</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Grain_(cipher)" title="Grain (cipher)">Grain</a></li>
<li><a href="MICKEY" title="MICKEY">MICKEY</a></li>
<li><a href="Trivium_(cipher)" title="Trivium (cipher)">Trivium</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other ciphers</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Achterbahn_(stream_cipher)" title="Achterbahn (stream cipher)">Achterbahn</a></li>
<li><a href="F-FCSR" title="F-FCSR">F-FCSR</a></li>
<li><a href="FISH_(cipher)" title="FISH (cipher)">FISH</a></li>
<li><a href="ISAAC_(cipher)" title="ISAAC (cipher)">ISAAC</a></li>
<li><a href="KCipher-2" title="KCipher-2">KCipher-2</a></li>
<li><a href="MUGI" title="MUGI">MUGI</a></li>
<li><a href="ORYX" title="ORYX">ORYX</a></li>
<li><a href="Panama_(cryptography)" title="Panama (cryptography)">Panama</a></li>
<li><a href="Phelix" title="Phelix">Phelix</a></li>
<li><a href="Pike_(cipher)" title="Pike (cipher)">Pike</a></li>
<li><a href="Py_(cipher)" title="Py (cipher)">Py</a></li>
<li><a href="QUAD_(cipher)" title="QUAD (cipher)">QUAD</a></li>
<li><a href="RC4#RC4+" title="RC4">RC4+</a></li>
<li><a href="RC4#RC4A" title="RC4">RC4A</a></li>
<li><a href="Scream_(cipher)" title="Scream (cipher)">Scream</a></li>
<li><a href="SEAL_(cipher)" title="SEAL (cipher)">SEAL</a></li>
<li><a href="SNOW" title="SNOW">SNOW</a></li>
<li><a href="SOBER" title="SOBER">SOBER</a></li>
<li><a href="SOBER-128" title="SOBER-128">SOBER-128</a></li>
<li><a href="Spritz_(cipher)" class="mw-redirect" title="Spritz (cipher)">Spritz</a></li>
<li><a href="Turing_(cipher)" title="Turing (cipher)">Turing</a></li>
<li><a href="VEST" title="VEST">VEST</a></li>
<li><a href="Variably_Modified_Permutation_Composition" title="Variably Modified Permutation Composition">VMPC</a></li>
<li><a href="WAKE_(cipher)" title="WAKE (cipher)">WAKE</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Generators</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Shrinking_generator" title="Shrinking generator">shrinking generator</a></li>
<li><a href="Self-shrinking_generator" title="Self-shrinking generator">self-shrinking generator</a></li>
<li><a href="Alternating_step_generator" title="Alternating step generator">alternating step generator</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Theory</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Block_cipher_mode_of_operation" title="Block cipher mode of operation">block ciphers in stream mode</a></li>
<li><a href="Shift_register" title="Shift register">shift register</a></li>
<li><a href="Linear-feedback_shift_register" title="Linear-feedback shift register">LFSR</a></li>
<li><a href="Nonlinear-feedback_shift_register" title="Nonlinear-feedback shift register">NLFSR</a></li>
<li><a href="T-function" title="T-function">T-function</a></li>
<li><a href="Initialization_vector" title="Initialization vector">IV</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Attacks</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Correlation_attack" title="Correlation attack">correlation attack</a></li>
<li><a href="Correlation_immunity" title="Correlation immunity">correlation immunity</a></li>
</ul>
</div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks mw-collapsible mw-collapsed navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Cryptography149" style="font-size:114%;margin:0 4em"><a href="Cryptography" title="Cryptography">Cryptography</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">General</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="History_of_cryptography" title="History of cryptography">History of cryptography</a></li>
<li><a href="Outline_of_cryptography" title="Outline of cryptography">Outline of cryptography</a></li>
<li><a href="Classical_cipher" title="Classical cipher">Classical cipher</a></li>
<li><a href="Cryptographic_protocol" title="Cryptographic protocol">Cryptographic protocol</a>
<ul><li><a href="Authentication_protocol" title="Authentication protocol">Authentication protocol</a></li></ul></li>
<li><a href="Cryptographic_primitive" title="Cryptographic primitive">Cryptographic primitive</a></li>
<li><a href="Cryptanalysis" title="Cryptanalysis">Cryptanalysis</a></li>
<li><a href="Cryptocurrency" title="Cryptocurrency">Cryptocurrency</a></li>
<li><a href="Cryptosystem" title="Cryptosystem">Cryptosystem</a></li>
<li><a href="Cryptographic_nonce" title="Cryptographic nonce">Cryptographic nonce</a></li>
<li><a href="Cryptovirology" title="Cryptovirology">Cryptovirology</a></li>
<li><a href="Hash_function" title="Hash function">Hash function</a>
<ul><li><a href="Cryptographic_hash_function" title="Cryptographic hash function">Cryptographic hash function</a></li>
<li><a href="Key_derivation_function" title="Key derivation function">Key derivation function</a></li>
<li><a href="Secure_Hash_Algorithms" title="Secure Hash Algorithms">Secure Hash Algorithms</a></li></ul></li>
<li><a href="Digital_signature" title="Digital signature">Digital signature</a></li>
<li><a href="Kleptography" title="Kleptography">Kleptography</a></li>
<li><a href="Key_(cryptography)" title="Key (cryptography)">Key (cryptography)</a></li>
<li><a href="Key_exchange" title="Key exchange">Key exchange</a></li>
<li><a href="Key_generator" title="Key generator">Key generator</a></li>
<li><a href="Key_schedule" title="Key schedule">Key schedule</a></li>
<li><a href="Key_stretching" title="Key stretching">Key stretching</a></li>
<li><a href="Keygen" title="Keygen">Keygen</a></li>
<li>Machines</li>
<li><a href="Cryptojacking_malware" class="mw-redirect" title="Cryptojacking malware">Cryptojacking malware</a></li>
<li><a href="Ransomware" title="Ransomware">Ransomware</a></li>
<li><a href="Random_number_generation" title="Random number generation">Random number generation</a>
<ul><li><a href="Cryptographically_secure_pseudorandom_number_generator" title="Cryptographically secure pseudorandom number generator">Cryptographically secure pseudorandom number generator</a> (CSPRNG)</li></ul></li>
<li><a href="Pseudorandom_noise" title="Pseudorandom noise">Pseudorandom noise</a> (PRN)</li>
<li><a href="Secure_channel" title="Secure channel">Secure channel</a></li>
<li><a href="Insecure_channel" class="mw-redirect" title="Insecure channel">Insecure channel</a></li>
<li><a href="Subliminal_channel" title="Subliminal channel">Subliminal channel</a></li>
<li><a href="Encryption" title="Encryption">Encryption</a></li>
<li><a href="Decryption" class="mw-redirect" title="Decryption">Decryption</a></li>
<li><a href="End-to-end_encryption" title="End-to-end encryption">End-to-end encryption</a></li>
<li><a href="Harvest_now%2C_decrypt_later" title="Harvest now, decrypt later">Harvest now, decrypt later</a></li>
<li><a href="Information-theoretic_security" title="Information-theoretic security">Information-theoretic security</a></li>
<li><a href="Plaintext" title="Plaintext">Plaintext</a></li>
<li><a href="Codetext" class="mw-redirect" title="Codetext">Codetext</a></li>
<li><a href="Ciphertext" title="Ciphertext">Ciphertext</a></li>
<li><a href="Shared_secret" title="Shared secret">Shared secret</a></li>
<li><a href="Trapdoor_function" title="Trapdoor function">Trapdoor function</a></li>
<li><a href="Trusted_timestamping" title="Trusted timestamping">Trusted timestamping</a></li>
<li><a href="Key-based_routing" title="Key-based routing">Key-based routing</a></li>
<li><a href="Onion_routing" title="Onion routing">Onion routing</a></li>
<li><a href="Garlic_routing" title="Garlic routing">Garlic routing</a></li>
<li><a href="Kademlia" title="Kademlia">Kademlia</a></li>
<li><a href="Mix_network" title="Mix network">Mix network</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Mathematics</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Cryptographic_hash_function" title="Cryptographic hash function">Cryptographic hash function</a></li>
<li><a href="Block_cipher" title="Block cipher">Block cipher</a></li>
<li><a href="Stream_cipher" title="Stream cipher">Stream cipher</a></li>
<li><a href="Symmetric-key_algorithm" title="Symmetric-key algorithm">Symmetric-key algorithm</a></li>
<li><a href="Authenticated_encryption" title="Authenticated encryption">Authenticated encryption</a></li>
<li><a href="Public-key_cryptography" title="Public-key cryptography">Public-key cryptography</a></li>
<li><a href="Quantum_key_distribution" title="Quantum key distribution">Quantum key distribution</a></li>
<li><a href="Quantum_cryptography" title="Quantum cryptography">Quantum cryptography</a></li>
<li><a href="Post-quantum_cryptography" title="Post-quantum cryptography">Post-quantum cryptography</a></li>
<li><a href="Message_authentication_code" title="Message authentication code">Message authentication code</a></li>
<li><a href="Cryptographically_secure_pseudorandom_number_generator" title="Cryptographically secure pseudorandom number generator">Random numbers</a></li>
<li><a href="Steganography" title="Steganography">Steganography</a></li></ul>
</div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div>
<ul><li><span class="noviewer" typeof="mw:File"><span title="Category"></span></span> Category</li></ul>
</div></td></tr></tbody></table><div></div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-08-06" href="https://en.wikipedia.org/wiki/?title=Stream_cipher_attacks&oldid=1304510077">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>